home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-MIPS / FP.H < prev    next >
Text File  |  1999-09-17  |  772b  |  31 lines

  1. /* $Id: fp.h,v 1.1 1998/07/16 17:01:54 ralf Exp $
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1998 by Ralf Baechle
  8.  */
  9.  
  10. /*
  11.  * Activate and deactive the floatingpoint accelerator.
  12.  */
  13. #define enable_cp1()                            \
  14.     __asm__ __volatile__(                        \
  15.         ".set\tnoat\n\t"                    \
  16.         "mfc0\t$1,$12\n\t"                    \
  17.         "or\t$1,%0\n\t"                        \
  18.         "mtc0\t$1,$12\n\t"                    \
  19.         ".set\tat"                        \
  20.         : : "r" (ST0_CU1));
  21.  
  22. #define disable_cp1()                            \
  23.     __asm__ __volatile__(                        \
  24.         ".set\tnoat\n\t"                    \
  25.         "mfc0\t$1,$12\n\t"                    \
  26.         "or\t$1,%0\n\t"                        \
  27.         "xor\t$1,%0\n\t"                    \
  28.         "mtc0\t$1,$12\n\t"                    \
  29.         ".set\tat"                        \
  30.         : : "r" (ST0_CU1));
  31.